package gonat

// // NatDevice :
// /// Represents a NAT device and provides access to the operation set that allows
// /// open (forward) ports, close ports and get the externa (visible) IP address.
// type NatDevice struct {
// 	/// <summary>
// 	/// A local endpoint of NAT device.
// 	/// </summary>
// 	HostEndPoint string
// 	/// <summary>
// 	/// A local IP address of client.
// 	/// </summary>
// 	LocalAddress net.Addr
// }

// INatDevice 预定义接口
type NatDevice interface {
	// /// <summary>
	// /// A local endpoint of NAT device.
	// /// </summary>
	// HostEndPoint string
	// /// <summary>
	// /// A local IP address of client.
	// /// </summary>
	// LocalAddress net.Addr

	// /// <summary>
	// /// Creates the port map asynchronous.
	// /// </summary>
	// /// <param name="mapping">The <see cref="Mapping">Mapping</see> entry.</param>
	// /// <example>
	// /// device.CreatePortMapAsync(new Mapping(Protocol.Tcp, 1700, 1600));
	// /// </example>
	// /// <exception cref="MappingException">MappingException</exception>
	AddPortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32) (err error)

	// /// <summary>
	// /// Deletes a mapped port asynchronous.
	// /// </summary>
	// /// <param name="mapping">The <see cref="Mapping">Mapping</see> entry.</param>
	// /// <example>
	// /// device.DeletePortMapAsync(new Mapping(Protocol.Tcp, 1700, 1600));
	// /// </example>
	// /// <exception cref="MappingException">MappingException-class</exception>
	DeletePortMapping(NewRemoteHost string, ExternalPort uint16, InternalPort uint16, Protocol string) (err error)

	// /// <summary>
	// /// Gets all mappings asynchronous.
	// /// </summary>
	// /// <returns>
	// /// The list of all forwarded ports
	// /// </returns>
	// /// <example>
	// /// var mappings = await device.GetAllMappingsAsync();
	// /// foreach(var mapping in mappings)
	// /// {
	// ///	 Console.WriteLine(mapping)
	// /// }
	// /// </example>
	// /// <exception cref="MappingException">MappingException</exception>
	GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error)

	// /// <summary>
	// /// Gets the external (visible) IP address asynchronous. This is the NAT device IP address
	// /// </summary>
	// /// <returns>
	// /// The public IP addrees
	// /// </returns>
	// /// <example>
	// /// Console.WriteLine("My public IP is: {0}", await device.GetExternalIPAsync());
	// /// </example>
	// /// <exception cref="MappingException">MappingException</exception>
	GetExternalIPAddress() (NewExternalIPAddress string, err error)

	// /// <summary>
	// /// Gets the specified mapping asynchronous.
	// /// </summary>
	// /// <param name="protocol">The protocol.</param>
	// /// <param name="port">The port.</param>
	// /// <returns>
	// /// The matching mapping
	// /// </returns>
	GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error)

	//GetAllMappings()
}

// func (device *NatDevice) GetHostEndPoint() string {
// 	return device.HostEndPoint
// }
// func (device *NatDevice) GetLocalAddress() net.Addr {
// 	return device.LocalAddress
// }
